#ifndef CLIENT_MODEL_H
#define CLIENT_MODEL_H

#include "model.h"
#include "GameObject.h"
#include <vector>
#include <list>
#include "SpaceShip.h"

enum clientObjectType
{
 C_PRIMITIVE = 0,
 C_SPRITE,
 C_PLAYERSPRITE
};

class ClientModel: public Model
{
  public:
    ClientModel(void);
	~ClientModel(void);

	GameObject* GetPlayerObject();
	GameObject* GetObjectByID(int id);
	void DestroyObject(int objectId);
    void AddNewObject(GameObject* obj, clientObjectType oType);
    void UpdateObjects(void);

	void Reset(void);
	Mobile* GetNextMobile(bool resetIterator);

	std::list<GameObject*>* GetAllGameObjects(void);
  protected:
	std::list<GameObject*> mObjects;
	GameObject* localPlayer;
	void Eradicate(void);
	std::list<GameObject*>::iterator spriteIterator;
	std::list<GameObject*>::iterator mobileIterator;
	Vertex* pointBuffer;
	Vertex* lineBuffer;
	int pointCount;
	int pointBufferSize;
	int lineCount;
	int lineBufferSize;
};

#endif
